//
//  PXHCountDownButton.h
//  CountDownButton
//
//  Created by YiXuePxh on 15/5/13.
//  Copyright (c) 2015年 上海益学. All rights reserved.
//

#import <UIKit/UIKit.h>
@class PXHCountDownButton;
typedef NSString* (^DidChangedBlock)(PXHCountDownButton* countDownButton,int second);
typedef NSString* (^DidFinishedBlock)(PXHCountDownButton* countDownButton,int second);
typedef void (^TouchedDownBlock)(PXHCountDownButton* countDownButton,NSInteger tag);
@interface PXHCountDownButton : UIButton
{
    int         _second;
    int         _totalSecond;
    NSTimer*    _timer;
    NSDate*     _startDate;
    
    DidChangedBlock     _didChangedBlock;
    DidFinishedBlock    _didFinishBlock;
    TouchedDownBlock    _touchedDownBlock;
}
-(void)beginWithTitle:(NSString* )title BgImage:(NSString* ) bgImage;
-(NSString* )changeWithTitle:(NSString* ) title BgImgae:(NSString* )bgImage;
-(NSString* )finishWithTitle:(NSString* ) title BgImgae:(NSString* )bgImage;
-(void)addTuochedHandler:(TouchedDownBlock)touchHandler;
-(void)didChange:(DidChangedBlock)didChangeBlock;
-(void)didFinished:(DidFinishedBlock)didFinishBlock;
-(void)startWithSecond:(int)totalSecond BgImage:(NSString* )bgImage;
-(void)stop;
@end
